<?php
declare (strict_types = 1);

namespace app\validate;


class StudentValidate extends BaseValidate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'sname'  =>  'require|max:10',
        'gender' =>  'require|min:1',
        'grade' =>  'require|max:10',
        'age' =>   'require|number|between:1,120',
        'homeplace' =>  'require|max:20',
        'race' =>  'require|max:20',
        'avatar' =>  'require',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [

    ];
}
